/**
 * Created by Admin on 2017/12/7.
 */
    $(function(){
        //var angel2 = 0;
        //var inteval=setInterval(function(){
        //    angel2+=-300;
        //    $(".fengche img").css('transform','rotate('+angel2+'deg)');
        //},150);
        $("body").append("<div style='position:fixed;background:rgba(0, 0, 0, 0.5);z-index: 300;	width: 100%; height:100%; text-align: center;left:0;top:0;text-align:center;display: none' class=\"fengche\"><img style='width:0.7rem;height:0.7rem;position: relative;top:5rem' src=\"./imgs/loading.gif\" alt=\"\" /></div>");



    });

function show_loading(){
    $(".fengche").css('display','block');
}
function  stop_loading(){
    $(".fengche").css('display','none');
}
popup = function() {
    var self = {};

    /* 调用方法
     amGloble.dg.popup.pop({
     content: '请选择至少一份',
     style: 'background-color:rgba(0,0,0,0.5);color:#fff;border:none;',
     time: 1
     });
     */

    self.pop = function(opt) {
        var opt0 = {};
        // 默认按钮
        if (opt) {
            opt0.title = opt.title || null;
            opt0.content = opt.content || '';
            opt0.time = opt.time || opt.duration || 2;
            //opt0.time = 200000;
            opt0.style = opt.style || 'background-color:rgba(0,0,0,0.5);color:#fff;border:none;font-size:0.4rem;padding:0.3rem;';
            opt0.btn = opt.btn || null;
        }
        layer.open(opt0);
    };

    return self;
}();